<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>640&代码生成</title>
    <link rel="stylesheet" href="../static/bootstrap/css/bootstrap.min.css" type="text/css">
    <script src="../static/jquery/jquery.1.11.1.min.js" type="text/javascript" ></script>
    <script src="../static/bootstrap/js/bootstrap.min.js"  type="text/javascript" ></script>
    <script src="../static/js/gen.js"  type="text/javascript" ></script>
</head>
<body>
<div class="container">
    <div class="row">
        <div class="col-md-12 column">
            <nav class="navbar navbar-default navbar-fixed-top" role="navigation" style="background: #4a9dce;">
                <div class="navbar-header">
                    <div class="navbar-brand" style="color: white;font-weight: bold;">代码生成</div>
                </div>
            </nav>
        </div>
    </div>
    <div class="row clearfix" style="margin-top:60px;">
        <div class="col-md-3">
            <% include("menu.html"){} %>
        </div>
        <div class="col-md-9 main-content">
            <div class="panel panel-primary">
                <div class="panel-heading">
                    <h3 class="panel-title">
                        Panel title
                    </h3>
                </div>
                <div class="panel-body">
                    <form class="form-horizontal" role="form" id="genForm">
                        <div class="form-group">
                            <label for="tablename" class="col-sm-2 control-label">表名</label>
                            <div class="col-sm-10">
                                <select name="tablename" id="tablename" class="form-control">
                                    <option value="">选择表名</option>
                                    <%
                                    for(t in tableList){
                                        print("<option value=\"");
                                        print(t);
                                        print("\">");
                                        print(t);
                                        print("</option>");
                                    }
                                    %>
                                </select>
                            </div>
                        </div>
                        <div class="form-group">
                            <label for="modelname" class="col-sm-2 control-label">实体名</label>
                            <div class="col-sm-10">
                                <input type="text" class="form-control" id="modelname" name="modelname"
                                       placeholder="请输入实体名">
                            </div>
                        </div>
                        <div class="form-group">
                            <label for="sqlmappath" class="col-sm-2 control-label">SQL文件路径</label>
                            <div class="col-sm-10">
                                <input type="text" class="form-control" id="sqlmappath" name="sqlmappath"
                                       placeholder="请输入SQL文件路径（默认桌面）" >
                            </div>
                        </div>
                        <div class="form-group">
                            <label for="mapperpath" class="col-sm-2 control-label">Mapper文件路径</label>
                            <div class="col-sm-10">
                                <input type="text" class="form-control" id="mapperpath" name="mapperpath"
                                       placeholder="请输入Mapper文件路径（默认桌面）" >
                            </div>
                        </div>
                        <div class="form-group">
                            <div class="col-sm-10 col-sm-offset-3">
                                <a href="javascript:void(0);" class="btn btn-success" onclick="Gen.genCode();">生成</a>
                            </div>
                        </div>
                    </form>
                </div>
            </div>
            <div class="panel panel-info">
                <div class="panel-heading">
                    <h3 class="panel-title">
                        日志
                    </h3>
                </div>
                <div class="panel-body">
                    <div id="infomsg">${tipInfos!}</div>
                </div>
            </div>
        </div>
    </div>
</div>
</div>
</body>
</html>